package com.zhentao.product.controller;

import com.zhentao.login.utils.Result;
import com.zhentao.nlz.project.dto.DictionaryDto;
import com.zhentao.nlz.project.product.TParamEterize;
import com.zhentao.product.service.TParamEterizeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("param")
public class TParamEterizeController {
    @Autowired
    private TParamEterizeService paramEterizeService;


    @GetMapping("list")
    public Result list(DictionaryDto dictionaryDto) {
        return paramEterizeService.PageParamEterize(dictionaryDto);
    }


    @PostMapping("save")
    public Result save(TParamEterize paramEterize) {
        boolean save = paramEterizeService.save(paramEterize);
        if(save){
            return Result.success("添加成功");
        }else {
            return Result.error("添加失败");
        }
    }
}
